<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<title></title>
	</head>
	<script type="text/javascript" src="js/jquery-2.1.0.js" ></script>
	<style>
		.active{color: red;}
		
		
	</style>
	<body>
		<h1>H!!!!</h1>
		<h2 id="h2"></h2>
		<ul>
			<li class="active">qqqqq</li>
			<li>qqqqq</li>
			<li>qqqqq</li>
			<li>qqqqq</li>
			<li>qqqqq</li>			
		</ul>
		
		
		
		
		<input type="button" name="button" id="button" value=" 按鈕" onclick="fu()"/>
		
		<script>
	
 
			var a= window.location.pathname;			 
			var index = a.lastIndexOf('\/');
			var str = a.substring(index+1,a.length);
			var num = str.indexOf('d');
			
			
 
			document.getElementById('h2').innerHTML  = num+'<br>'+index+'<br>' + str
			if(-1=){
			$('ul li:eq(3)').addClass('active')	
			$('ul li:eq(3)').html('3333333333333')
			}
 
			 	
			 	
		</script>
		
		
	</body>
</html>
